function u_show_userMainDiv(){
	var main_page_map = {
			"PO_MAIN" : { 
							container_div : "pomain_div", 
							header : "Purchase Orders" , 
							subpages : [ 
							             {
							            	 container_div : "porecieved_div", 
							            	 header : "PO's Received", 
							            	 initfunc : "init_poreceived",  
							            	 subpages : [
							            	             {
							            	            	 container_div : "poreceived_yui_table"
							            	             }]
							             } , 
							             {
							            	 container_div : "posent_div", 
							            	 header : "PO's Sent", 
							            	 initfunc : "init_posent",
							            	 subpages : [
							            	             {
							            	            	 container_div : "posent_yui_table"
							            	             }
							            	             ]},{
							            	            	 container_div : "pocreate_div", 
							            	            	 header : "Create Purchase Order", 
							            	            	 initfunc: "init_pocreate"
							            	             }]},
			"INV_MAIN" : { container_div : "invmain_div", header : "Invoices" , subpages : [ {container_div : "invrecieved_div", header : "Invoices Received"} , {container_div : "invsent_div", header : "Invoices Sent"}  ] },
			"PMT_MAIN" : { container_div : "pmtmain_div", header : "Payments" , subpages : [ {container_div : "pmtrecieved_div1", header : "Payments Received"} , {container_div : "pmtsent_div1", header : "Payments Sent"}  ] },
			"CM_MAIN" : { container_div : "cmmain_div", header : "Credit Memos" , subpages : [ {container_div : "cmrecieved_div", header : "Credit Memos Received"} , {container_div : "cmsent_div", header : "Credit Memos Sent"}  ] },
			"REPT_MAIN" : { container_div : "reptmain_div", header : "Reports" }
	}
	page_map = main_page_map;
	u_hideAllSections();
	u_safeShowElement('tn_user_main_div');
	u_safeShowElement('tcon-main-dashboard');
	//tn_onMainMenuClick(null,null,['PO_MAIN', 'porecieved_div']);
	isNotFromDashboard = false;
	assignInvToDashBoard();
	assignPayToDashBoard();
	assignCmemoToDashBoard();
	if(!isNavigationFromBackButton){
		var functionPointerObj = new Object();
		functionPointerObj.functionName = "u_show_userMainDiv()";
		navigationStateArray.push(functionPointerObj);
	}
}
var isNotFromDashboard = false;

function init_homepage(){
	u_show_userMainDiv();
	init_poreceived();
	init_posent();
	init_invreceived();
	init_invsent();
	init_pmtreceived();
	init_pmtsent();
	init_cmemoreceived();
	init_cmemosent();
	document.getElementById('porecieved_div').style.display = 'block';
	document.getElementById('posent_div').style.display = 'block';
	document.getElementById('invrecieved_div').style.display = 'block';
	document.getElementById('invsent_div').style.display = 'block';
	document.getElementById('pmtrecieved_div').style.display = 'block';
	document.getElementById('pmtsent_div').style.display = 'block';
	document.getElementById('cmemorecieved_div').style.display = 'block';
	document.getElementById('cmemosent_div').style.display = 'block';
	assignInvToDashBoard();
	assignPayToDashBoard();
	assignCmemoToDashBoard();
	show_comp_admin_links();

}



var navigationStateArray = new Array();
var isNavigationFromBackButton = false;
function u_show_backScreen(){
	if(navigationStateArray.length > 0){
		var functionPointerObj = navigationStateArray.pop(); //current
		if(navigationStateArray.length > 0){
			functionPointerObj = navigationStateArray.pop(); //prev
		}
		eval(functionPointerObj.functionName);
	} else{
		
	}
}